package com.gqb.ssm.mapper;

import com.gqb.ssm.pojo.Address;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

/**
 * Created by 小泽玛丽罗 on 2016/11/22.
 */
@MapperScan
public interface AddressMapper {
    public void add(Address address);
    public Address getById(int id);


    @Select(value = "select * from address where id=#{id}")
    @ResultType(Address.class)
    public Address getByAno(int id);

    @Select(value = "select * from address")
    @ResultType(Address.class)
    public List<Address> getAll();
}
